A technique of calculating the depth of each position in an image and performing image processing on each position according to the calculated depth to improve a sense of depth of the image has been known in related art.
With the technique of the related art, however, the processing for improving the sense of depth is performed on all of positions in an image, which causes a problem that parts for which it is not desired to improve the sense of depth are also processed. In this case, for example, there is a problem that the range of the depth is narrow. There is also a problem, for example, that, when a background of an image taken indoors is smoothed, a sense of sharpness of the image will be lost and the image will be perceived as being deteriorated in image quality.